{% extends 'Base/main.content.lists.div.html.twig' %}{% import 'Base/list_item.twig' as listItem %}
{#{% block options %}#}
{#{% endblock %}#}
{% block tableHead %}
    <tr>
        <th align="center" width="3%">选择</th>
        <th align="center" width="3%">#</th>
        <th align="left">分类</th>
        <th align="left" width="5%">level</th>
        <th align="left" width="5%">图标</th>
        <th align="left" width="10%">图标代码</th>
        <th align="left" width="30%">链接</th>
        <th align="left" width="10%">排序</th>
        <th align="center" width="10%">-</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align="">
                <span class="checkall" style="vertical-align:middle;">
                    <input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.AdminMenu_id }}"  lay-skin="primary" />
                </span>
            </td>
            <td align="left">{{ Entity.AdminMenu_id }}</td>
            <td align="left">
                {% if Entity.AdminMenu_level > 0 %}{% for i in 0..Entity.AdminMenu_level %}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{% endfor %}├{% for i in 0..Entity.AdminMenu_level %}─{% endfor %}{% endif %}
                {{ Entity.AdminMenu_name }}
            </td>
            <td align="left">{{ Entity.AdminMenu_level }}</td>
            <td align="left">
                {% if Entity.AdminMenu_pic %}
                    <span class="{{ Entity.AdminMenu_pic }} fa-2x"></span>
                {% endif %}
            </td>
            <td align="left">
                {{ listItem.editVal('pic',Entity.AdminMenu_pic,Entity.AdminMenu_id) }}
                {#<input#}
                        {#id="val_pic_{{ Entity.AdminMenu_id }}"#}
                        {#type="text" value="{{ Entity.AdminMenu_pic }}"#}
                        {#class="layui-input"#}
                        {#onkeydown="return checkNumber(event);"#}
                        {#data-id="{{ Entity.AdminMenu_id }}"#}
                        {#data-name="pic"#}
                        {#data-selector='#val_{{ name }}_{{ id }}'#}
                        {#onblur="__doPostBack('setAttr','id={{ Entity.AdminMenu_id }}&pic='+ $('#val_pic_{{ Entity.AdminMenu_id }}').val())"#}
                        {#>#}
            </td>
            <td align="left">
                {{ listItem.editVal('link',Entity.AdminMenu_link,Entity.AdminMenu_id) }}
                {#<input#}
                        {#id="val_link_{{ Entity.AdminMenu_id }}"#}
                        {#type="text" value="{{ Entity.AdminMenu_link }}"#}
                        {#class="layui-input"#}
                        {#onkeydown="return checkNumber(event);"#}
                        {#onblur="__doPostBack('setAttr','id={{ Entity.AdminMenu_id }}&link='+ $('#val_link_{{ Entity.AdminMenu_id }}').val())"#}
                        {#>#}
            </td>
            <td align="left">
                {{ listItem.editVal('orders',Entity.AdminMenu_orders,Entity.AdminMenu_id) }}
                {#<input#}
                        {#id="val_orders_{{ Entity.AdminMenu_id }}"#}
                        {#type="text" value="{{ Entity.AdminMenu_orders }}"#}
                        {#class="layui-input"#}
                        {#onkeydown="return checkNumber(event);"#}
                        {#onblur="__doPostBack('setAttr','id={{ Entity.AdminMenu_id }}&orders='+ $('#val_orders_{{ Entity.AdminMenu_id }}').val())"#}
                        {#>#}
            </td>
            <td align="center">
                <div class="layui-btn-group">
                    <a href="{{ path("AdminMenuDoCopy",{'id':Entity.AdminMenu_id}) }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-copy c13"></span></a>
                    <a href="{{ path("AdminMenuPreAdd") }}?parent={{ Entity.AdminMenu_id }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-plus c13"></span></a>
                    <a href="{{ path("AdminMenuPreEdit",{'id':Entity.AdminMenu_id}) }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-edit c13"></span></a>

                </div>
            </td>
        </tr>
    {% endfor %}
{% endblock %}


